import React, { memo } from 'react'

import { HeaderWrap } from './style'
export default memo(function Header(props) {
    const { title, tags = [], more } = props
    return (
        <HeaderWrap className="sprite_02">
            <div className="header-left">
                <div className="title">
                    <a className="title" href="tofo"> {title} </a>
                </div>
                <div className="tags">
                    {
                        tags.map((item,index) => {
                            return (
                                <React.Fragment key={index}>
                                    <a href="todo" >{item}</a>
                                    {
                                        (index === tags.length -1) ? '':(<span className="line">|</span>)
                                    }
                                </React.Fragment>
                            )
                        })
                    }
                </div>
            </div>
            <div className="header-right">
                <a href={more || 'todo'}>更多</a>
                <i className="sprite_02"></i>
            </div>
        </HeaderWrap>
    )
})
